﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    EnableEventValidation="false" CodeBehind="CodeTable.aspx.cs" Inherits="Mortgage.Form.CodeTable" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <title>Thiết lập nội dung hiện thị hệ thống</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <center>
        <div class="setting">
            Thiết lập nội dung hiện thị:
            <asp:DropDownList ID="drpConfigType" runat="server" DataTextField="Name" Width="200px"
                DataValueField="Code" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="drpConfigType_SelectedIndexChanged">
                <asp:ListItem Text="" Value="" />
            </asp:DropDownList>
            &nbsp;&nbsp;Is system:&nbsp<asp:Label runat="server" ID="fldIsSystem" />
        </div>
    </center>
    <div class="grid">
        <center>
            <asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" BackColor="White"
                BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" DataKeyNames="ID"
                CellPadding="3" OnSelectedIndexChanged="grid_SelectedIndexChanged" EnableModelValidation="True">
                <EmptyDataTemplate>
                    <div class="noData">
                        Chưa có dữ liệu thiết lập!</div>
                </EmptyDataTemplate>
                <Columns>
                    <asp:CommandField ShowSelectButton="True" SelectImageUrl="~/Images/icon/select.gif"
                        ButtonType="Image" />
                    <asp:BoundField DataField="ID" HeaderText="ID" ItemStyle-Width="150px" ReadOnly="True"
                        SortExpression="ID">
                        <ItemStyle Width="150px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="Value" HeaderText="Nội dung hiện thị">
                        <ItemStyle Width="150px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="SortOrder" HeaderText="Thứ tự hiện thị" ItemStyle-Width="100px">
                        <ItemStyle Width="100px"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="Description" HeaderText="Ghi chú" ReadOnly="True" ItemStyle-Width="300px">
                        <ItemStyle Width="300px"></ItemStyle>
                    </asp:BoundField>
                </Columns>
                <FooterStyle BackColor="White" ForeColor="#000066" />
                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Center" />
                <RowStyle ForeColor="#000066" />
                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
            </asp:GridView>
        </center>
    </div>
    <div class="detail">
        <div class="header">
            Thiết lập nội dung hiện thị hệ thống</div>
        <asp:Label ID="DialogMess" runat="server" CssClass="failureNotification" />
        <asp:HiddenField ID="fldID" runat="server" />
        <table>
            <tr>
                <td class="label">
                    Nội dung hiện thị:<span class="required">*</span>
                </td>
                <td>
                    <asp:TextBox ID="fldValue" runat="server" Enabled="false" MaxLength="500" Width="200px" />
                    <asp:RequiredFieldValidator ID="reqfldValue" runat="server" ErrorMessage="*" ValidationGroup="detail"
                        CssClass="failureNotification" ControlToValidate="fldValue" />
                </td>
            </tr>
            <tr>
                <td class="label">
                    Thứ tự hiện thị:<span class="required">*</span>
                </td>
                <td>
                    <asp:TextBox ID="fldSortOrder" runat="server" MaxLength="50" Width="50px" />
                    <asp:RangeValidator ID="reqfldSortOrder" runat="server" Type="Integer" MinimumValue="-21474836"
                        ValidationGroup="detail" MaximumValue="21474836" ControlToValidate="fldSortOrder"
                        ErrorMessage="*" />
                </td>
            </tr>
            <tr>
                <td class="label">
                    Ghi chú:
                </td>
                <td>
                    <asp:TextBox ID="fldDescription" runat="server" TextMode="MultiLine" Width="476px" />
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:Button ID="btnDelete" runat="server" Text="Xóa" CssClass="btnDelete" CausesValidation="false"
                        OnClick="btnDelete_Click" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnNew" runat="server" Text="Tạo mới" CssClass="btnNew" CausesValidation="false"
                        OnClick="btnNew_Click" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnSave" runat="server" Text="Lưu" CssClass="btnSave" ValidationGroup="detail"
                        OnClick="btnSave_Click" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnCancel" runat="server" Text="Huy" CssClass="btnCancel" CausesValidation="false"
                        OnClick="btnCancel_Click" />
                    <ajaxtoolkit:ConfirmButtonExtender ID="cfmDelete" runat="server" ConfirmText="Bạn có thực sự muốn xóa dữ liệu này?"
                        TargetControlID="btnDelete" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
